package org.moonlight.jvm.instructions.control.ret;

import org.moonlight.jvm.instructions.base.NoOperandsInstruction;
import org.moonlight.jvm.rtda.exclusive.Frame;

/**
 * return指令: 用于返回 void 的情况
 *
 * @author Moonlight
 * @createTime 2023/9/12 14:05
 **/
public class Return extends NoOperandsInstruction {

    @Override
    public void execute(Frame frame) {
        // 把当前栈帧从虚拟机栈中弹出即可
        frame.getThread().popFrame();
    }

}
